package com.eirikb.shared.events;

import com.eirikb.client.Client;

/**
 *
 * @author eirikb
 */
public class JoinEvent extends Event {

    private String nick;
    private String name;

    public JoinEvent() {
    }

    public JoinEvent(String nick, String name) {
        this.nick = nick;
        this.name = name;
    }

    public void execute(Client client) {
        client.getChat().addNick(nick);
        client.getChat().addChat("> " + nick + " ankom chatten (" + name + ")");
    }
}
